window.onload = function(){ //页面加载完后开始

        //获取两个样式
        let lastchild = document.getElementById('lastchild');
        let userange = document.getElementById('userange')
        //当图标点击事件发生时,添加关键帧动画
        lastchild.addEventListener('click',e)
        function e() {
            // alert("click")
            document.styleSheets[0].insertRule(
            `@keyframes range {
                    0% {opacity:0;}
                    10% {opacity:80%}
                    90% {opacity:80%}
                    100% {opacity:0%}
                }`)
            userange.style.setProperty("animation","range 4s linear")
            setTimeout(clock,4000)
        }
        function clock(){
            userange.style.setProperty("animation","none")
        }

        removeEventListener('click',e)

}
